Root Zanli
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
o5t6x7pgljbm
/
public_html
/
admin
/
app
/
V2
/
Dtos
/
Filename :
SearchDTO.php
back
Copy
<?php namespace App\V2\Dtos; class SearchDTO extends BaseDTO{ public $q; //Values should be 'REWARD', 'TASK' public $entity_type; public $required_for; public static function builder() { return new class extends BaseDTOBuilder { public function __construct() { $this->dto = new SearchDTO(); } public function copyFrom(BaseDTO $dto) { parent::copyFrom($dto); if($dto instanceof SearchDTO){ $this->dto->q = $dto->q; $this->dto->entity_type = $dto->entity_type; $this->dto->required_for = $dto->required_for; } return $this; } public function build() { return $this->dto; } public function q($q){ $this->dto->q = $q; return $this; } public function entityType($entity_type){ $this->dto->entity_type = $entity_type; return $this; } public function required_for($required_for){ $this->dto->required_for = $required_for; return $this; } }; } function getQ(){ return $this->q; } function getEntityType(){ return $this->entity_type; } function getRequiredFor(){ return $this->required_for; } } ?>